#ifndef __DICTIONAY_H__
#define __DICTIONAY_H__
#include<vector>
#include<map>
#include<set>
#include<string>

using std::map;
using std::vector;
using std::string;
using std::set;
using std::pair;

class Dictionary
{
public:

//嵌套类自动释放
class reaslse
{
    public:
    reaslse();
    ~reaslse();
    private:
};
//构造函数
    Dictionary();

    //对外构造接口
    static Dictionary* getInstance();
    //初始化数据成员
    void init ();

    //获取数据成员
    vector<pair<string,int>>& getVector();
     map<string,set<int>>& queryIndex();
     
     //该函数已作废
    int distance(string candidate);
private:
    vector<pair<string,int>> _dict;
    map<string,set<int>> _index;
   static Dictionary* _diction;
   static reaslse  _quit;
};
#endif
